{
    title: "Quick Tour",
    crumbs: [
        { "User's Guide": "index.html" }
    ],
}

            <h1>Package Versions</h1>
            <p>Pak uses version strings in the <em>package.json</em> file in several places. 
                Versions follow the <a href="http://semver.org">Semver 2</a> standard. i.e.
                major.minor.patch[-pre-release] which prescribes the precise meaning of each component of the 
                version string. For example:</p>
            <pre class="code">$ <b>pak search bootstrap</b>
{
    "name": "kickstart",
    "version": "0.8.1",
    "dependencies": {
        "esp-angular": "^5.3",
        "esp-mgr-skeleton": "^5.3"
    }
}
</pre>

            <table class="ui table" title="properties">
                <thead>
                    <tr><th>Field</th><th>Usage</th><th>Description</th></tr>
                </thead>
                <tbody>
                    <tr><td>version</td><td>Version String</td><td>Package version number.</td></tr>
                    <tr><td>dependencies</td><td>Version Expression</td><td>Object collection of dependent packages 
                        and a version expression criteria.</td> </tr>
                    <tr><td>optionalDependencies</td><td>Version Expression</td><td>Object collection of optionally dependent packages 
                        and a version expression criteria.</td> </tr>
                </tbody>
            </table>

            <p>Version expressions are also used in Pak override files. See <a href="customizing.html">Customizing
            Packages</a> for more details.</p>
            <pre class="code">
{
    "jquery/jquery": {
        "&gt;=2.1.0": {
            "pak": { 
                /* more */ 
            }
        },
        "&gt;=1.11.0": {
            "pak": { 
                /* more */ 
            }
        }
    }
}
</pre>

            <a name="expressions"></a>
            <h2>Version Expressions</h2>
            <p>Version expressions are used by <em>dependency</em>, <em>optionalDependency</em> properties in the
            package.json file and in package override files. The following terms are permitted in version expressions.</p>

            <table title="versions" class="ui celled table segment">
                <thead>
                    <tr>
                        <th class="nowrap">Topic</th>
                        <th>Description</th>
                    </tr>
                </thead>
                <tbody>
                    <tr><td>1.2.3</td><td>Simple version. Allows prereleases.</td></tr>
                    <tr><td>1.2.X </td><td>Any patch for 1.2. Allows prereleases.</td></tr>
                    <tr><td>^1.2.3</td><td>Compatible with 1.2. Same as &gt;=1.2.3 &lt;2.0.0 &mdash; 
                        does not allow prereleases.</td></tr>
                    <tr><td>~1.2.3</td><td>Compatible with 1.2. Same as &gt;=1.2.3 &lt;2.0.0 &mdash; 
                        allows prereleases.</td></tr>
                    <tr><td>&gt;, &gt;=, &lt;, &lt;=, ==, != </td><td>Version comparison.</td></tr>
                    <tr><td>expression || expression </td><td>Either expression matches.</td></tr>
                    <tr><td>expression &amp;&amp; expression </td><td>Both expressions must qualify.</td></tr>
                    <tr><td>expression expression </td><td>Same as &amp;&amp;</td></tr>
                </tbody>
            </table>

            <p>For example:</p>
            <pre class="code">
{ 
    "dependencies" : { 
        "simple" : "2.0.1",

        /* Range of acceptable versions */
        "foo"    : "&gt;=1.0.0 &lt;2.10.20",

        /* Compatible with 1.2 - same minor number, allows pre-releases */
        "compat" : "~1.2",

        /* Compatible with 1.2 - but no pre-releases */
        "full"   : "^2.x",

        "complex": "1.2.3 || 1.2.8 || 1.3.*",
    }
}
</pre>
                    
